Ajax does not send the data to my php file [migrated]

Posted by Mert METIN on Pro Webmasters See other posts from Pro Webmasters or by Mert METIN
Published on 2012-03-23T18:21:14Z Indexed on 2012/03/23 23:40 UTC
Read the original article Hit count: 404

Filed under:
|

I try to send my data to php file but does not work. This my ajax file

 var artistIds = new Array();

    $(".p16 input:checked").each(function(){
        artistIds.push($(this).attr('id'));
    });


   $.post('/json/crewonly/deleteDataAjax2', { artistIds: artistIds },function(response){
        if(response == 'ok')
            alert('dolu');
        elseif (response == 'error')
            alert('bos');
    });

and this is my php

public function deleteDataAjax2() {

        extract($_POST);

        if (isset($artistIds))
            $this->sendJSONResponse('ok');
        else
            $this->sendJSONResponse('error');
    }

However, my artistIds in php side is null. Why ?

© Pro Webmasters or respective owner

Related posts about php

Related posts about AJAX